<?php include HEADER; ?>

<link href="<?php echo __URL_BASE ?>css/jquery-ui.css" rel="stylesheet" type="text/css">
<script src="<?php echo __URL_BASE ?>js/jquery-ui.js" type="text/javascript"></script>

<style>
.slg{
	width: 50px !important;
	padding: 2px !important;
	position: relative;
	top: 1px;
	left: 5px;
}
input[type=radio]{
	position: relative;
	top: 3px;
}
</style>
<?php
	$loai_id = (isset($loai)) ? $loai->id : '';
	$tenloai = (isset($loai)) ? $loai->TenLoai : '';
	$trangthai = (isset($loai)) ? $loai->TrangThai : '';
?>

<div >
<form method="post" action="<?php if(isset($_REQUEST['loai_id'])) 
									echo __URL_BASE.'index.php?rt=admin_loai/save&loai_id='.$_REQUEST['loai_id'] ;
								  else	
									echo __URL_BASE.'index.php?rt=admin_loai/save';
							?>" >

    <table class="TableUpdate" border="1">
    
        <tr>
            <td class="Control" colspan="2">
              <ul>
                <li>
                   <button type="submit" class="uupdate" style="border:none" >Ghi lại</button>
                </li>
                <li>
                  <label class="uback"  >Trở về</label>
                </li>
              </ul></td>
          </tr>
		  <tr >
            <th>Tên loại :</th>
            <td><input type="text"  class="text" name="ttenloai" required  value="<?php echo $tenloai ?>" /></td>
          </tr>
          
		   <tr>
            <th>Trạng thái :</th>
            <td>
				Hoạt động &nbsp;&nbsp;<input type="radio" name="rtrangthai" value="1" checked="checked" /> 
				&nbsp;&nbsp;
				 Khóa <input type="radio" name="rtrangthai" value="0"  <?php if($trangthai == '0') echo 'checked="checked"'; ?> style="margin-left: 16px;"/>
			</td>
          </tr>
		 
		  
          <tr>
            <td class="Control" colspan="2">
              <ul>
                <li>
                  <button type="submit" class="uupdate" style="border:none" >Ghi lại</button>
                </li>
                <li>
                  <label class="uback"  >Trở về</label>
                </li>
              </ul></td>
          </tr>
    </table>
</form>

 </div>
<?php if(isset($message_user))  echo "<script>alert('".$message_user."');</script>";  ?>
<?php if(isset($message_email))  echo "<script>alert('".$message_email."');</script>";  ?>
<?php include FOOTER; ?>


